<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <script>
        // Reflect.get()
        let obj = {
            foo: 1,
            bar: 2,
            get baz() {
                return this.foo + this.bar;
            }
        };
        console.log(Reflect.get(obj, 'foo'));
        console.log(Reflect.get(obj, 'bar'));
        console.log(Reflect.get(obj, 'baz'));
        console.log('---------------------');

        // Reflect.set()
        let obj1 = {
            foo: 1,
            set bar(value) {
                return this.foo = value;
            }
        };
        Reflect.set(obj1, 'foo', 2);
        console.log(obj1.foo);


        function myDate() {
            
        }
        Reflect.defineProperty(myDate, 'now', {
            value: () => Date.now()
        })

    </script>

</head>
<body>

</body>
</html>